import {
	onShow
} from '@dcloudio/uni-app'

// 修改tabbar
export const changeTabbar = (index) => {
	onShow(() => {
		const curPages = getCurrentPages()[0];
		if (typeof curPages.getTabBar === 'function' && curPages.getTabBar()) {
			curPages.getTabBar().setData({
				selected: index
			});
		}
	})
}